package com.agranee.timesheet.dao;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.springframework.transaction.annotation.Transactional;

import com.agranee.timesheet.daoable.IEmployeeAdd;
import com.agranee.timesheet.model.Employee;

@Transactional
public class EmployeeAddDaoImpl implements IEmployeeAdd {
	
	private SessionFactory sessionFactory;
	
	 private Session getCurrentSession() {
		 
	 return sessionFactory.getCurrentSession();
		 
		     }

	@Override
	public void add(Employee employee) {
		getCurrentSession().save(employee);
		
		
	}

}
